import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import Vant from "vant";
import "vant/lib/index.css";
import "./assets/style/main.css";
import moment from "moment";
import { NoticeBar } from 'vant';
import { Toast } from 'vant';

Vue.use(Toast);
Vue.use(NoticeBar);
Vue.prototype.$moment = moment;
Vue.use(Vant);
Vue.config.productionTip = false;
Vue.filter("dalImg", (str) => {
  if (str) {
    if (str.startsWith("http")) {
      return str;
    }
    return "http://localhost:1337" + str;
  }
  return "https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimage1.xyzs.com%2Fupload%2Fdd%2F06%2F114553%2F20130831%2F137795749842797_0.jpg&refer=http%3A%2F%2Fimage1.xyzs.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1623312084&t=863bf79707195ce95c517676bfa71ac0";
});
new Vue({
  router,
  render: (h) => h(App),
}).$mount("#app");
